Use AccountPtr in testpushnotifications
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Thu, 23 Mar 2023 16:47:41 +0000 (17:47 +0100)
committerJyrki Gadinger <nilsding@nilsding.org>
Tue, 15 Apr 2025 12:13:34 +0000 (14:13 +0200)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
test/testpushnotifications.cpp

index ee7e0c4fcc56ff78efd6eae948eaa112bede3af1..e8a2ab08cf120f3075c7303a995eda2eb24cf2e1 100644 (file)
@@ -257,8 +257,8 @@ private slots:
 
         QCOMPARE(connectionLostSpy.count(), 1);
 
-        auto accountSent = pushNotificationsDisabledSpy.at(0).at(0).value<OCC::Account *>();
-        QCOMPARE(accountSent, account.data());
+        const auto accountSent = pushNotificationsDisabledSpy.at(0).at(0).value<OCC::AccountPtr>();
+        QCOMPARE(accountSent.data(), account.data());
     }
 
     void testAccount_web_socket_authenticationFailed_emitNotificationsDisabled()
@@ -272,8 +272,8 @@ private slots:
 
         // Now the pushNotificationsDisabled Signal should be emitted
         QCOMPARE(pushNotificationsDisabledSpy.count(), 1);
-        auto accountSent = pushNotificationsDisabledSpy.at(0).at(0).value<OCC::Account *>();
-        QCOMPARE(accountSent, account.data());
+        const auto accountSent = pushNotificationsDisabledSpy.at(0).at(0).value<OCC::AccountPtr>();
+        QCOMPARE(accountSent.data(), account.data());
     }
 
     void testPingTimeout_pingTimedOut_reconnect()